using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Google.Protobuf;

public class Main : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        TestProtobuf();
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    void TestProtobuf()
    {
        login_req req = new login_req { Token = "123456" };
        byte[] s = req.ToByteArray();

        login_req req2 = new login_req();
        req2.MergeFrom(s);

        Debug.Log("测试:" + s.Length + "," + req2.Token);
    }
}
